home *** CD-ROM | disk | FTP | other *** search
- class classes.fx.DeathWallFX
- {
- var x;
- var y;
- var id;
- var dir;
- var frame;
- var cMax;
- var clip;
- var a;
- var yMov = 0;
- var c = 0;
- var Name = "deathWallFX";
- function DeathWallFX(px, py, pdir, pframe, pid)
- {
- this.x = px;
- this.y = py;
- this.id = pid;
- this.dir = pdir;
- this.frame = pframe;
- this.cMax = _root.randRange(10,30);
- _root.d = _root.d + 1;
- this.clip = _root.attachMovie("deathWallFX","deathWallFX" + this.id + "Clip",_root.d);
- this.clip._x = this.x;
- this.clip._y = this.y;
- this.a = _root.randRange(30,60);
- this.clip._alpha = this.a;
- this.clip.gotoAndStop(this.frame);
- this.yMov = this.dir != "U" ? _root.randRange(20,40) : _root.randRange(-20,-40);
- }
- function main()
- {
- this.c = this.c + 1;
- if(this.c >= this.cMax)
- {
- _root.removeFX("deathWallFX" + this.id);
- }
- this.clip._alpha = this.a - this.c * (this.a / this.cMax);
- this.y += this.yMov;
- this.clip._x = this.x;
- this.clip._y = this.y;
- }
- }
-